home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
object1a
/
frmscrol.frm
(
.txt
)
next >
Wrap
Visual Basic Form
|
1999-10-17
|
3KB
|
93 lines
VERSION 5.00
Begin VB.Form frmScroll
BorderStyle = 3 'Fixed Dialog
Caption = "Object Scroll Example"
ClientHeight = 3675
ClientLeft = 45
ClientTop = 330
ClientWidth = 4680
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3675
ScaleWidth = 4680
ShowInTaskbar = 0 'False
StartUpPosition = 3 'Windows Default
Begin VB.CommandButton Command2
Caption = "Scroll Down"
BeginProperty Font
Name = "Arial"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 720
TabIndex = 1
Top = 3240
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "Scroll Up"
BeginProperty Font
Name = "Arial"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 2760
TabIndex = 0
Top = 3240
Width = 1215
End
Begin VB.Line Line2
BorderColor = &H00FFFFFF&
X1 = 120
X2 = 4440
Y1 = 3000
Y2 = 3000
End
Begin VB.Line Line1
BorderColor = &H00808080&
BorderWidth = 2
X1 = 120
X2 = 4440
Y1 = 3000
Y2 = 3000
End
Begin VB.Label Label1
Appearance = 0 'Flat
BackColor = &H80000005&
BackStyle = 0 'Transparent
BorderStyle = 1 'Fixed Single
Caption = "This label object will be used to scroll up or down. Visit - www.fpsoftware.bizland.com"
ForeColor = &H80000008&
Height = 495
Left = 480
TabIndex = 2
Top = 120
Width = 3615
End
Attribute VB_Name = "frmScroll"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
If Label1.Top = 120 Then: Exit Sub 'The object will not Scroll Up if Top = "120"
Label1.Top = (Label1.Top - 2) 'Make this number higher to create a faster scroll
Loop Until Label1.Top = 120 ' Loops code until it reaches its destination
End Sub
Private Sub Command2_Click()
If Label1.Top = 2400 Then: Exit Sub 'The object will not scroll down if Top = "2400"
Label1.Top = (Label1.Top + 2) 'Make this number higher to create a faster scroll
Loop Until Label1.Top = 2400 ' Loops code until it reaches its destination
End Sub